﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="FillReturnInfo.ascx.cs"
    Inherits="UserControls_FillReturnInfo" %>
<%@ Register Assembly="Infragistics2.WebUI.WebCombo.v7.1, Version=7.1.20071.40, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.WebUI.WebCombo" TagPrefix="igcmbo" %>
<%@ Register Assembly="Infragistics2.WebUI.UltraWebGrid.v7.1, Version=7.1.20071.40, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.WebUI.UltraWebGrid" TagPrefix="igtbl" %>
<%@ Register Assembly="Infragistics2.WebUI.WebDataInput.v7.1, Version=7.1.20071.40, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.WebUI.WebDataInput" TagPrefix="igtxt" %>
<%@ Register Assembly="Shove.Web.UI.4 For.NET 2.0" Namespace="Shove.Web.UI" TagPrefix="ShoveWebUI" %>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<script language="javascript" type="text/javascript">
    function IsNull()
    {
        if (document.getElementById('<%=this.wcSaleNo.ClientID%>').value=="")
        {
            alert("请输入或者说选择订单号！");
            return false;
        }
       
    }
    function Check()
    {
        if(document.getElementById('<%=this.txtGoodNo.ClientID%>').value=="")
        {
            alert("请输入商品编号，多个以,隔开！");
            return false;
        }
    }
    function clicks(e,f,g)
    {
        var txt = document.getElementById('<%=this.txtGoodNo.ClientID%>');
        
        if(g.checked==true)
        {
            
            if(txt.value!="")
            {
                txt.value = txt.value+","+e;
            }else 
            {
                txt.value=e;
             }
       }else
       {
            var array = txt.value.split(","); 
            for( i=0;i<array.length;i++)
            {
                if(array[i]==e)
                {
                    txt.value= Common.delArr(array,i);
                }
            }
            
       }
    }
</script>

<table width="759" border="0" cellpadding="0" cellspacing="1" bgcolor="#E7C890">
    <tr>
        <td bgcolor="#FFFFFF">
            <table width="757" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td width="139" height="23" align="left" background="images/bg_gold_23.jpg" class="black12"
                        style="padding-left: 10px;">
                        退货申请</td>
                    <td width="679" align="right" background="images/bg_gold_23_2.jpg">
                        &nbsp;</td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td height="25" bgcolor="#FFFFFF">
            <div style="height: 10px;">
            </div>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td width="15%" height="26" align="right" class="black12">
                        订单号：</td>
                    <td class="help12" align="left">
                        <igcmbo:WebCombo ID="wcSaleNo" runat="server" BackColor="White" BorderColor="Silver"
                            BorderStyle="Solid" BorderWidth="1px" Editable="True" ForeColor="Black" SelBackColor="DarkBlue"
                            SelForeColor="White" Version="4.00">
                            <Columns>
                                <igtbl:UltraGridColumn BaseColumnName="SalesNO" HeaderText="你的订单" Key="SalesNO" Width="190px">
                                    <header caption="你的订单"></header>
                                </igtbl:UltraGridColumn>
                            </Columns>
                            <ExpandEffects ShadowColor="LightGray"></ExpandEffects>
                            <DropDownLayout BorderCollapse="Separate" RowHeightDefault="20px" Version="4.00"
                                AutoGenerateColumns="False">
                                <FrameStyle Cursor="Default" BackColor="Silver" BorderWidth="2px" BorderStyle="Ridge"
                                    Font-Names="Verdana" Font-Size="10pt" Height="130px" Width="325px">
                                </FrameStyle>
                                <HeaderStyle BackColor="LightGray" BorderStyle="Solid">
                                    <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px"></BorderDetails>
                                </HeaderStyle>
                                <RowStyle BackColor="White" BorderColor="Gray" BorderWidth="1px" BorderStyle="Solid">
                                    <BorderDetails WidthLeft="0px" WidthTop="0px"></BorderDetails>
                                </RowStyle>
                                <SelectedRowStyle BackColor="DarkBlue" ForeColor="White"></SelectedRowStyle>
                            </DropDownLayout>
                        </igcmbo:WebCombo>
                    </td>
                    <td width="15%" height="26" align="right" class="black12">
                        商品编号：
                    </td>
                    <td align="left">
                        <asp:TextBox ID="txtGoodNo" runat="server" CssClass="in_p2"></asp:TextBox><asp:Button
                            ID="btnSearch" runat="server" Text="查询" Width="80px" OnClick="btnSearch_Click"
                            OnClientClick="return IsNull()" /></td>
                </tr>
                <tr>
                    <td align="right" class="black12">
                      类型：
                    </td>
                    <td colspan="3" align="left">
                        <asp:RadioButtonList ID="rblType" runat="server" CssClass="black12" RepeatDirection="Horizontal">
                            <asp:ListItem Selected="True" Value="1">退货</asp:ListItem>
                            <asp:ListItem Selected="True" Value="2">换货</asp:ListItem>
                        </asp:RadioButtonList></td>
                </tr>
                <tr id="SalesNo" runat="server">
                    <td width="15%" height="26" align="right" class="black12">
                        订单列表：</td>
                    <td colspan="3" class="help12" align="left" bgcolor="#FFFFFF" id="SaleDetail" runat="server">
                        <div style="height: 10px;">
                        </div>
                        <asp:GridView ID="gvOrders" runat="server" AutoGenerateColumns="False" Style="text-align: center"
                            BackColor="#CCCCCC" Width="98%" DataKeyNames="GoodNO,GoodID,Price" OnRowDataBound="gvOrders_RowDataBound">
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="cbCheck" runat="server" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="GoodName_CN" HeaderText="商品名称" />
                                <asp:BoundField DataField="GoodNorm" HeaderText="商品规格" />
                                <asp:BoundField DataField="GoodColor" HeaderText="商品颜色" />
                                <asp:BoundField DataField="Amount" HeaderText="商品数量" />
                            </Columns>
                            <HeaderStyle Width="23px" Height="23px" />
                        </asp:GridView>
                    </td>
                </tr>
                <tr>
                    <td width="15%" height="26" align="right" class="black12">
                        备注说明：
                    </td>
                    <td colspan="3" align="left">
                        <asp:TextBox ID="txtReturnReason" runat="server" CssClass="in_p2" Height="95px" TextMode="MultiLine"
                            Width="616px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td colspan="4" align="center" height="26">
                        <asp:Button ID="btnOK" runat="server" Text="申请" Width="80px" OnClick="btnOK_Click"
                            OnClientClick="return Check()" /></td>
                </tr>
            </table>
            <div style="height: 10px;">
            </div>
        </td>
    </tr>
</table>
